<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@page import="java.util.List"%>
<%@page import="sdfi.lee.Entity.Platform"%>
<%@page import="sdfi.lee.DAO.PlatDAO"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="../css/index.css" />
<link rel="stylesheet" href="../css/level.css" />
<script type="text/javascript" src="../js/jquery-1.6.js" ></script>
<script type="text/javascript" src="../js/index.js"></script>
<script type="text/javascript">
$(function(){

	
});
</script>
<meta name="location" content="<a href='<c:url value='/platform/platlist.jsp?pg=1' />'>单元平台</a>">
<title>Insert title here</title>
</head>
<body>
<% 
List<Platform> list=new PlatDAO().getPlatform(20,Integer.valueOf(request.getParameter("pg")));
	if(null!=list&&list.size()>0)
		{
		request.setAttribute("list",list);
			
%>
	
			<c:forEach items="${requestScope.list}" var="plat" varStatus="status">
				<c:url value="/platform/platdetail.jsp" var="platurl">
					<c:param name="platid" value="${plat.id}"></c:param>
					<c:param name="pg" value="${param.pg }"></c:param>
				</c:url>
					<div class="epitem">
			<table width="100%">
				<tr>
					<td style="width:20%;text-align:left">
						<a href="${platurl}"><img src="<c:url value='${plat.platPath}' />"></a>
					</td>
					<td>
						<a href="${platurl}">${plat.platname}</a>
					</td>
				</tr>
			</table>
				</div>
				
		</c:forEach>
		
	<%
		}
	else
	{
	%>
		<div>无数据</div>
	<%
	}
	%>
				<div style="clear:left"></div>
			  <div id="pages">
                	
                	每页<span>20</span>条,第<span>${param.pg}</span>页,该页
                	<span>${fn:length(requestScope.list) }</span>条
                    <c:choose>
                		<c:when test='${param.pg==null||param.pg==""||param.pg==1}'>
                				<span>上页</span>
                		</c:when>
                		<c:otherwise>
                			<c:url value='/news/newslist.jsp?type=${param.type}&pg=${param.pg-1}'  var="down"/>
                			 <a href="${down}">上页</a>
                		</c:otherwise>
                	</c:choose>
                	
                   	<c:choose>
                   		<c:when test="${fn:length(requestScope.list)<20}">
                   			<span>下页</span>
                   		</c:when>
                   		<c:otherwise>
                   		<a href="<c:url value='/news/newslist.jsp?type=${param.type}&pg=${param.pg+1}' />">下页</a>
                   		</c:otherwise>
                   	</c:choose>
                    
                </div>
</body>
</html>